/**
 * 导出相关接口
 *
 */
import request from '@/utils/request'

// 导出所有门店二维码
export function downAllShopPromoteQrCode() {
  return request({
    url: 'statistics_admin/task/export_register_qrcode',
    method: 'post'
  })
}

// 根据门店导出二维码
export function downUserPromoteQrCode(data) {
  return request({
    url: '/statistics_admin/task/export_promoter_code',
    method: 'post',
    data: data
  })
}

// 导出推广提成报表
export function downPromotersBonusRecord(data) {
  return request({
    url: '/statistics_admin/task/export_promoter_record',
    method: 'post',
    data: data
  })
}

// 导出余额变动报表
export function downBalanceChangeRecord(data) {
  return request({
    url: '/statistics_admin/task/export_balance_record',
    method: 'post',
    data: data
  })
}

// 导出虚拟终端
export function downBusinessDevice(data) {
  return request({
    url: '/statistics_admin/task/export_device',
    method: 'post',
    data: data
  })
}

// 导出交易记录
export function downExportPayRecord(data) {
  return request({
    url: '/statistics_admin/task/export_pay_record',
    method: 'post',
    data: data
  })
}

// 导出退款记录
export function downExportRefundRecord(data) {
  return request({
    url: '/statistics_admin/task/export_refund_record',
    method: 'post',
    data: data
  })
}

// 导出交易汇总
export function downExportPaySummary(data) {
  return request({
    url: '/statistics_admin/task/export_pay_summary',
    method: 'post',
    data: data
  })
}

// 导出预订记录
export function downExportBookingOrders(data) {
  return request({
    url: '/statistics_admin/task/export_booking_orders',
    method: 'post',
    data: data
  })
}

// 导出商城订单列表
export function downMallOrdersList(data) {
  return request({
    url: '/statistics_admin/task/export_mall_record',
    method: 'post',
    data: data
  })
}

// 导出二维码制作
export function downWxQrcodeList(params) {
  return request({
    url: '/statistics_admin/task/export_qrcode_list',
    method: 'post',
    params: params
  })
}

// 导出二维码制作
export function downLeaveRecords(params) {
  return request({
    url: '/payscancode/admin/leaveRecords/export',
    method: 'post',
    params: params
  })
}

// 导出二维码制作
export function downDepositRecords(data) {
  return request({
    url: '/statistics_admin/task/export_deposit_orders',
    method: 'post',
    data: data
  })
}

// 导出h5码牌支付二维码
export function downH5PayQrcode(data) {
  return request({
    url: '/statistics_admin/task/export_h5_pay_qrcode',
    method: 'post',
    data: data
  })
}

/**
 * @method downSchoolPayRechargeTotal
 * @description 导出缴费记录
 */

export function downSchoolPayRechargeTotal(params) {
  return request({
    url: '/payscancode/admin/rechargeExport',
    method: 'post',
    params: params
  })
}

// 获取导出列表
export function getExportTaskList(data) {
  return request({
    url: '/statistics_admin/task/get_export_task_list',
    method: 'post',
    data: data
  })
}

// 根据taskId下载对应文件
export function downByTaskId(taskId) {
  return request({
    url: '/statistics_admin/task/download',
    method: 'get',
    params: { taskId }
  })
}

// 导出二维码制作
export function downPrtWxQrcodeList(params) {
  return request({
    url: '/statistics_admin/task/export_qrcode_list_servicer',
    method: 'post',
    params: params
  })
}

// 核心商户导出合作商户佣金接口
export function downCooperateMerCommission(data) {
  return request({
    url:
      '/statistics_admin/task/exportCooperateMerCommission?joinBusinessId=' +
      data.joinBusinessId,
    method: 'post',
    data
  })
}

// 核心商户导出合作商户补贴接口
export function downCooperateMerSubsidy(data) {
  return request({
    url:
      '/statistics_admin/task/exportCooperateMerSubsidy?joinBusinessId=' +
      data.joinBusinessId,
    method: 'post',
    data
  })
}

// 合作商户导出返佣接口
export function downCoreMerCommission(data) {
  return request({
    url:
      '/statistics_admin/task/exportCoreMerCommission?joinBusinessId=' +
      data.businessId,
    method: 'post',
    data
  })
}

// 合作商户导出补贴接口
export function downCoreMerSubsidy(data) {
  return request({
    url:
      '/statistics_admin/task/exportCoreMerSubsidy?joinBusinessId=' +
      data.businessId,
    method: 'post',
    data
  })
}

// 导出自定义表单
export function exportLowCodePageRecord(data) {
  return request({
    url: '/statistics_admin/task/export_lowCodePage_record',
    method: 'post',
    data
  })
}
// 商户后台导出卡发放报表
export function exportCardGrantReport(data) {
  return request({
    url: '/business_admin/task/exportCardGrantReport',
    method: 'post',
    data
  })
}
// 商户后台导出卡核销报表
export function exportCardVerifyReport(data) {
  return request({
    url: '/business_admin/task/exportCardVerifyReport',
    method: 'post',
    data
  })
}
// 商户后台导出券发放报表
export function exportCouponGrantReport(data) {
  return request({
    url: '/business_admin/task/exportCouponGrantReport',
    method: 'post',
    data
  })
}
// 商户后台导出券核销报表
export function exportCouponVerifyReport(data) {
  return request({
    url: '/business_admin/task/exportCouponVerifyReport',
    method: 'post',
    data
  })
}
